<template>
  <el-dialog v-dialogDrag :visible.sync="dialogVisible" title="单号详情" width="1000px">
    <button-group ref="buttonGroup" @cancel="dialogVisible = false" />
    <el-row>
      <div class="detailsTop">
        <span>生产排程单</span>
        <el-divider content-position="right">{{ ruleForm.scheduleNo }}</el-divider>
      </div>
      <div class="detailCont detailDialogFont threeDetailStyle">
        <ul>
          <li>
            <b>排程单号</b>
            <span>{{ ruleForm.scheduleNo }}</span>
          </li>
          <li>
            <b>作业单号</b>
            <span>{{ ruleForm.reportNo }}</span>
          </li>
          <li>
            <b>计划单号</b>
            <span>{{ ruleForm.planNo }}</span>
          </li>
          <li>
            <b>物料名称</b>
            <span>{{ ruleForm.materialName }}</span>
          </li>
          <li>
            <b>物料编码</b>
            <span>{{ ruleForm.materialCode }}</span>
          </li>
          <li>
            <b>排程数量</b>
            <span>{{ ruleForm.scheduleNum }}</span>
          </li>
          <li>
            <b>物料Bom</b>
            <span>{{ ruleForm.bomVersion }}</span>
          </li>
          <li>
            <b>排程开始时间</b>
            <span>{{ ruleForm.scheduleBeginDate }}</span>
          </li>
          <li>
            <b>排程结束时间</b>
            <span>{{ ruleForm.scheduleEndDate }}</span>
          </li>
          <li>
            <b>排程人</b>
            <span>{{ ruleForm.scheduleName }}</span>
          </li>
          <li>
            <b>作业车间</b>
            <span>{{ ruleForm.factoryName }}</span>
          </li>
          <li class="oneHang">
            <b>备注</b>
            <span>{{ ruleForm.remark }}</span>
          </li>
        </ul>
      </div>
    </el-row>
    <bottom-font ref="bottomFont" :obj-name="ruleForm.scheduleName ? ruleForm.scheduleName : this.$store.getters.compInfo.userName" :obj-date="ruleForm.scheduleBeginDate" />
  </el-dialog>
</template>
<script>
import bottomFont from '@/components/BottomFont'
export default {
  components: { bottomFont },
  props: {},
  data() {
    return {
      dialogVisible: false,
      ruleForm: {}
    }
  },
  watch: {},
  mounted() {},
  methods: {
    async showDialog(row) {
      this.getDetail(row.id)
      this.dialogVisible = true
    },
    /* 编辑获取详情 */
    async getDetail(id) {
      const res = await this.$axios.get(`/pro/schedule/detail?id=${id}`)
      if (res.data.code === 200) {
        this.ruleForm = res.data.data
      }
    }
  }
}
</script>
<style lang='scss' scoped>
</style>
